/** 用户名刷新结构,传入用户名,可返回显示名及原始用户名 **/
package anshe.struct
{
	public class ExUserNames
	{
		public static const GUEST_SIGN:String	= "Guest_";

		public var userName:String;		/** 用户的原始名称 **/
		public var dispName:String;		/** 用于显示在列表上的名称 **/
		
		public function ExUserNames(str:String = ""):void
		{
			userName = str;
			dispName = setPlayerName(str);
		}
		
		private function setPlayerName(str:String):String
		{
			var tStr:String = str;
			
			if(tStr.toLowerCase().indexOf(GUEST_SIGN.toLowerCase()) >= 0)
			{
				tStr = tStr.substr(GUEST_SIGN.length);
			}
			
			return tStr;
		}

	}
}